Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Web.UI
Public Class ucPostBackAlerts
    Inherits Control
    Dim _listaAlertas As New List(Of clAlerta)
    Public ReadOnly Property listaAlertas() As List(Of clAlerta)
        Get
            Return _listaAlertas
        End Get
    End Property


    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
        Dim a As clAlerta
        With writer

            .RenderBeginTag(HtmlTextWriterTag.Script)
            For Each a In _listaAlertas
                .Write(String.Format("alert('{0}');", a.Texto))
            Next

            .RenderEndTag()



        End With


    End Sub

End Class
